-- msg_relic_func
-- Create by panyl
-- 服务器应答消息

return function(lpc)
    -- 遍历所有的已经开启功能
    local buffer = Buffer.create(lpc.buf);
    local offset = 1;
    local size = Buffer.size(buffer);
    local relicFunction = {};
    while (offset <= size) do
        local id = Buffer.getu16(buffer, offset);
        local level = Buffer.getu16(buffer, offset + 2);

        relicFunction[id] = level;

        -- 继续下一个
        offset = offset + 4;
    end

    ME.user.dbase:set("relic_function", relicFunction);

    -- 刷新属性
    PropM.refreshEffect(ME.user, "relic_func");
end
